home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 123
/
(Vol 123) Jan 13 2011.iso
/
Games
/
go-fishing.swf
/
scripts
/
DefineSprite_223
/
frame_5
/
DoAction.as
Wrap
Text File
|
2011-01-13
|
783b
|
36 lines
fishhook_y = getProperty("/ship/fishhook", _Y);
fish_x = getProperty(my_name, _X);
fish_y = getProperty(my_name, _Y);
delta_x = eval("/:fishhook_x") - fish_x;
delta_y = fishhook_y - fish_y;
if(eval("/:hit") == "1")
{
if((fishhook_width + fish_width) * (fishhook_width + fish_width) >= delta_x * delta_x + delta_y * delta_y)
{
gotoAndPlay(24);
set("/:hit","0");
set("/:movie_enable","0");
l = "1";
}
}
if("600" < fish_x)
{
gotoAndStop(1);
set("/:count","/:count - 1");
set("/:a6","0");
setProperty(my_name, _X, former_x);
setProperty(my_name, _Y, former_y);
}
else
{
setProperty(my_name, _X, fish_x + speed);
}
if(turn_o == "3")
{
turn = random("30");
}
if(turn == "19")
{
gotoAndPlay(15);
}